package com.ncr.travel.appmgr.client.command;

import com.google.gwt.user.client.Command;
import com.ncr.nep.dashboardcore.rest.client.HTTPRequest;
import com.ncr.nep.dashboardcore.rest.client.JSONCallback;
import com.ncr.nep.dashboardcore.rest.client.MIMEType;
import com.ncr.travel.appmgr.client.service.AppManagerWebService;
import com.ncr.travel.appmgr.model.shared.ApplicationConfiguration;

public class GetProducts implements Command {

	private final AppManagerWebService webService;
	private final JSONCallback<ApplicationConfiguration> callback;

	public GetProducts(AppManagerWebService webService, JSONCallback<ApplicationConfiguration> callback) {
		this.webService = webService;
		this.callback = callback;
	}

	@Override
	public void execute() {
		webService.doGet("/products?userName=testUser", new HTTPRequest().accept(MIMEType.APPLICATION_JSON), callback);
	}
}